﻿using SuporeSliplampApp.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace SuporeSliplampApp.Models
{
    public class PageModel:NotifyBase
    {
		public PageModel(int _page, int currentPage, int pageType =1) 
		{
			this.Page = _page;
			this.PageType = pageType;
			this.isCurrentPage = _page == currentPage;
		}
		private int page;

		public int Page
		{
			get { return page; }
			set { page = value;this.NotifyChanged(); }
		}

		private int pageType =1;

		public int PageType
		{
			get { return pageType; }
			set 
			{ 
				pageType = value; 
				this.NotifyChanged();
				if (PageType == 1)
				{
					NumberVisibility = Visibility.Visible;
					SymbolVisibility = Visibility.Collapsed;
				}
				else
				{
					NumberVisibility= Visibility.Collapsed;
					SymbolVisibility = Visibility.Visible;
				}
			}
		}
		private bool isCurrentPage = false;

		public bool IsCurrentPage
		{
			get { return isCurrentPage; }
			set { isCurrentPage = value;this.NotifyChanged(); }
		}

		private Visibility numberVisibility = Visibility.Visible;

		public Visibility NumberVisibility
        {
			get { return numberVisibility; }
			set { numberVisibility = value; this.NotifyChanged(); }
		}

		private Visibility symbolVisibility = Visibility.Visible;

		public Visibility SymbolVisibility
        {
			get { return symbolVisibility; }
			set { symbolVisibility = value;this.NotifyChanged(); }
		}





	}
}
